package cn.bs.busuo.front.content.dao.persist.mapper;

import cn.bs.busuo.front.content.pojo.entity.ContentSightArticle;
import cn.bs.busuo.front.content.pojo.vo.ContentSightArticleByTitleVO;
import cn.bs.busuo.front.content.pojo.vo.UserContentSightArticleByIdVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author: Feng
 * @since: 2023/12/8
 */
@Repository
public interface UserSightArticleMapper extends BaseMapper<ContentSightArticle> {
    //判断文章标题是否存在
    int contentSightArticleByTitle(String title);
    //根据文章标题查询Id
    Long selectSightArticleByTitle(String title);
    //根据Id查询文章是否存在
    ContentSightArticle selectSightArticleById(Long id);
    //修改文章显示状态
    int updateSightArticleById(Long id);
    //根据酒店Id查询文章
    List<UserContentSightArticleByIdVO> selectSightArticleBySightId(Long id);
    //查看自己的酒店文章
    List<UserContentSightArticleByIdVO> selectUserListSightArticle(String authorName);
    //增加文章好评数
    int increaseUpCount(Long id);
    //增加文章差评数
    int increaseDownCount(Long id);
    //修改景点文章
    int updateSightArticle(String title, String brief, String coverUrl, String keywords, Long id);
    //增加景点评论数
    void increaseCommentCount(Long id);
    //根据文章标题查询文章存入redis
    ContentSightArticleByTitleVO selectSightArticleByTitleVO(String title);
}
